package com.gadgets.cm01.user.controller;

import com.gadgets.cm01.user.dto.UserChangePwdDTO;
import com.gadgets.cm01.user.dto.UserInfoOperationDTO;
import com.gadgets.cm01.user.dto.UserInfoQueryDTO;
import com.gadgets.cm01.user.pojo.User;
import com.gadgets.framework.common.dto.HttpBaseResp;
import com.gadgets.framework.common.dto.Pagination;
import com.gadgets.framework.common.exception.GadgetsException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-09-16
 *
 */
public interface IUserInfoOperationController {

    /**
     * 新增用户信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param userInfoOperationDTO                   用户信息
     * @return                              标准应答
     * @throws GadgetsException      异常信息
     */
    HttpBaseResp<Object> addUserInfo(HttpServletRequest request, HttpServletResponse response, UserInfoOperationDTO userInfoOperationDTO) throws GadgetsException;

    /**
     * 修改用户密码
     * @param request                       请求信息
     * @param response                      应答信息
     * @param userChangePwdDTO              用户修改密码信息
     * @throws GadgetsException      异常信息
     */
    HttpBaseResp<Object> changeUserPwd(HttpServletRequest request, HttpServletResponse response, UserChangePwdDTO userChangePwdDTO) throws GadgetsException;

    /**
     * 初始化用户密码
     * @param request                       请求信息
     * @param response                      应答信息
     * @param userChangePwdDTO              用户修改密码信息
     * @throws GadgetsException      异常信息
     */
    HttpBaseResp<Object> initUserPwd(HttpServletRequest request, HttpServletResponse response, UserChangePwdDTO userChangePwdDTO) throws GadgetsException;

    /**
     * 删除用户信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param operationDTO                  用户修改密码信息
     * @throws GadgetsException      异常信息
     */
    HttpBaseResp<Object> deleteUserInfo(HttpServletRequest request, HttpServletResponse response, UserInfoOperationDTO operationDTO) throws GadgetsException;

    /**
     * 查询用户
     * @param request                       请求信息
     * @param response                      应答信息
     * @param queryDTO                      查询条件
     * @param pagination                    分页条件
     * @return                              查询结果
     * @throws GadgetsException      异常信息
     */
    HttpBaseResp<User> queryUserInfoByCondition(HttpServletRequest request, HttpServletResponse response, UserInfoQueryDTO queryDTO, Pagination pagination) throws GadgetsException;

    /**
     * 操作用户状态
     * @param request                       请求信息
     * @param response                      应答信息
     * @param operationDTO                  操作信息
     * @throws GadgetsException             异常信息
     */
    HttpBaseResp<Object> operateUserStatus(HttpServletRequest request, HttpServletResponse response, UserInfoOperationDTO operationDTO) throws GadgetsException;

}
